package com.main.entity;

import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;

/**
 * @author admin
 * @date 2019/05/20
 */
/*@XmlRootElement表示元素根元素*/
@XmlRootElement
public class XmlEntity {

    private Integer id;
    private String xmlName;
    private String xmlValue;

    public Integer getId() {
        return id;
    }

    /*xml的元素，set方法上*/
    @XmlElement
    public void setId(Integer id) {
        this.id = id;
    }

    public String getXmlName() {
        return xmlName;
    }

    /*xml的元素，set方法上*/
    @XmlElement
    public void setXmlName(String xmlName) {
        this.xmlName = xmlName;
    }

    public String getXmlValue() {
        return xmlValue;
    }

    /*xml的元素，set方法上*/
    @XmlElement
    public void setXmlValue(String xmlValue) {
        this.xmlValue = xmlValue;
    }

    @Override
    public String toString() {
        return "XmlEntity{" +
                "id=" + id +
                ", xmlName='" + xmlName + '\'' +
                ", xmlValue='" + xmlValue + '\'' +
                '}';
    }
}
